package cn.tedu.csmall.product.web;

/**
 * @author liyang
 * @version 1.0
 * @package cn.tedu.csmall.product.web
 * @file ServiceCode.java
 * @description
 * @time 2024/9/8 上午12:49
 */
public enum ServiceCode {
//    每一个枚举值就是当前类型的对象
    OK(20000),
    ERR_BAD_REQUEST(40000),
    ERR_CONFLICT(40900),
    ERR_NOT_FOUND(40400),
    ERR_INSERT(50000),
    ERR_DELETE(50100),
    ERR_UPDATE(50200),
    ERR_SELECT(50300),
    ERR_UNKNOWN(99999);

    private Integer value;

    /**
     * 枚举的方法固定私有权限
     */
    ServiceCode(Integer value) {
        this.value = value;
    }

    public Integer getValue() {
        return value;
    }
}
